<template>
    <div>
        <webview id="foo" src="http://127.0.0.1:8080/test.html" style="width:100%; height:500px;" preload="./static/js/test.js"></webview>
    </div>
</template>
<script>
export default {
    data(){
        return {
            toUser:'',
            message:'',
        }
    },
     mounted() {
         this.onConf();
     },
     methods:{
         onConf(){
             var webview = document.getElementById("foo");
            webview.addEventListener("dom-ready", function(){
            webview.openDevTools() // 这里！ 打开 webview的控制台
            });
         }
     }
}
</script>
<style>

</style>
